package org.example.controller;


import org.example.entity.Patient;
import org.example.model.DataModel;
import org.example.service.PatientService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;


@Controller
public class PatientController {

    private PatientService patientService;

    public PatientController(PatientService patientService) {
        this.patientService = patientService;
    }

    @ResponseBody
    @RequestMapping("/getAll")
    public List<Patient> getAll() { List<Patient> allPatient = patientService.getAllPatient();return allPatient; }
    @ResponseBody
    @RequestMapping("getmapData")
    public List<DataModel> getMapData() { return patientService.getMapData(); }
    @ResponseBody
    @RequestMapping("getConfirmedNum")
    public int getConfirmedNum() { return patientService.getConfirmedNum(); }
    @ResponseBody
    @RequestMapping("getRegisteredNum")
    public int getRegisteredNum() {
        return patientService.getRegisteredNum();
    }
    @ResponseBody
    @RequestMapping("getSymptomaticNum")
    public int getSymptomaticNum() {
        return patientService.getSymptomaticNum();
    }
    @ResponseBody
    @RequestMapping("getAsymptomaticNum")
    public int getAsymptomaticNum() {
        return patientService.getAsymptomaticNum();
    }
    @ResponseBody
    @RequestMapping("getSuspectedNum")
    public int getSuspectedNum() {
        return patientService.getSuspectedNum();
    }
    @ResponseBody
    @RequestMapping("getCureNum")
    public int getCureNum() {
        return patientService.getCureNum();
    }
    @ResponseBody
    @RequestMapping("getSeriousNum")
    public int getSeriousNum() {
        return patientService.getSeriousNum();
    }
    @ResponseBody
    @RequestMapping("getDeathNum")
    public int getDeathNum() {
        return patientService.getDeathNum();
    }
    @ResponseBody
    @RequestMapping("getConfirmedNumadd")
    public int getConfirmedNumadd() { return patientService.getConfirmedNumadd(); }
    @ResponseBody
    @RequestMapping("getRegisteredNumadd")
    public int getRegisteredNumadd() { return patientService.getRegisteredNumadd(); }
    @ResponseBody
    @RequestMapping("getSymptomaticNumadd")
    public int getSymptomaticNumadd() {
        return patientService.getSymptomaticNumadd();
    }
    @ResponseBody
    @RequestMapping("getAsymptomaticNumadd")
    public int getAsymptomaticNumadd() {
        return patientService.getAsymptomaticNumadd();
    }
    @ResponseBody
    @RequestMapping("getSuspectedNumadd")
    public int getSuspectedNumadd() {
        return patientService.getSuspectedNumadd();
    }
    @ResponseBody
    @RequestMapping("getCureNumadd")
    public int getCureNumadd() {
        return patientService.getCureNumadd();
    }
    @ResponseBody
    @RequestMapping("getSeriousNumadd")
    public int getSeriousNumadd() { return patientService.getSeriousNumadd(); }
    @ResponseBody
    @RequestMapping("getDeathNumadd")
    public int getDeathNumadd() {
        return patientService.getDeathNumadd();
    }
}
